package com.yootk;
import java.io.File;
public class YootDemo4 {
    public static void main(String[] args) throws Exception {
        File file = new File("d:" + File.separator + "muyan" + File.separator + "vip" + File.separator + "yootk.txt");
        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdir();
        }
        if (file.exists()) {
            System.out.println("【文件存在】执行删除操作:" + file.delete());
        } else {
            System.out.println("【文件不存在】执行创建操作:"+ file.createNewFile());
        }
    }
}
